<template>
    <div class="bg_color">
        <div class="big_div" style="display: block;">

            <div v-if="category_id ==3" class="center_info" style="margin-top: 1.22rem;text-align: center;">
                <div style="font-size:0.19rem;color:#339933;"><img class="duihao" src="../../../static/image/home/duihao.png" />预定成功！</div>
                <div class="ulev1" style="color:#686872;margin-top:0.16rem;">等待酒店确认接单</div>
                <div class="ulev1" style="color:#686872;margin-top:0.08rem;">如酒店不接单将全额退款至您的付款账户</div>
            </div>

            <div  v-else-if="category_id ==-1" class="center_info" style="margin-top: 1.22rem;text-align: center;">
                <div style="font-size:0.19rem;color:#339933;"><img class="duihao" src="../../../static/image/home/duihao.png" />预定成功！</div>
                <div class="ulev1" style="color:#686872;margin-top:0.16rem;"></div>
                <div class="ulev1" style="color:#686872;margin-top:0.08rem;"></div>
            </div>

            <div v-else class="center_info" style="margin-top: 1.22rem;text-align: center;">
                <div style="font-size:0.19rem;color:#339933;"><img class="duihao" src="../../../static/image/home/duihao.png" />预定成功！</div>
                <div class="ulev1" style="color:#686872;margin-top:0.16rem;">出票成功会有短信提醒</div>
                <div class="ulev1" style="color:#686872;margin-top:0.08rem;">出票失败系统自动退款</div>
            </div>
            <div class="center_button ub ub-pc" style="margin-top: 0.27rem;">
                <div @click="go_home" id="back_home" class="back_home ub ub-ac ub-pc">返回首页</div>
                <div @click="go_detail" id="see_detail" class="see_detail ub ub-ac ub-pc" style="margin-left: 0.2rem;">查看详情</div>
            </div>
        </div>
    </div>

</template>

<script>
    import {getRecommend} from '../../service/httpService'
    import tool from '../../config/mUtil/tool'
    import date from '../../config/mUtil/dateUtil'
    import cardId from '../../config/mUtil/cardId'
    import info from '../../config/info'
    import { Toast } from 'mint-ui';
    import { Swipe, SwipeItem,Switch,} from 'mint-ui';
    export default {
        name: "pay_success",
        data(){
            return {
                //order_id:11487,
                order_id:this.$route.query.order_id,
                list:[],
                recommend_list:[],
                recommend_flag:false,
                category_id:-1,


            }
        },
        mounted(){
            this.$nextTick(() => {
                this.baseData(this.order_id);
            })
        },
        methods:{
            baseData(order_id){
                getRecommend({order_id:order_id}).then(res=>{
                    this.list = res['data'];
                    this.recommend_list = this.list['list'];
                    this.category_id = this.list['category_id'];
                    if(this.recommend_list.length ==0 || this.recommend_list.length ==1){
                        this.recommend_flag = false;
                    }else{
                        // this.recommend_flag= true;
                         this.recommend_flag= false;
                    }
                }).catch(e=>{
                    Toast('服务器掉了！');
                })
            },
            go_home(){
                tool.$router.push(this,{
                    name:'home'
                })
            },
            go_detail(){
                tool.$router.push(this,{
                    name:'order_detail',
                    query:{
                        order_id:this.order_id,
                    }
                })
            }


        }
    }
</script>

<style scoped lang="scss" type="text/scss">
    @import "../../../static/css/ui-base.css";
    @import "../../../static/css/ui-box.css";
    @import "../../../static/css/ui-color.css";
    //@import "../../../static/css/main.css";
    .back_home {
        font-size: 0.14rem;
        color: #2d2e3a;
        height: 0.38rem;
        padding-left: 0.4rem;
        padding-right: 0.4rem;
        border-radius: 1rem;
        border: 1px solid #2d2e3a;
    }

    .see_detail {
        font-size: 0.14rem;
        color: #ffffff;
        height: 0.38rem;
        padding-left: 0.4rem;
        padding-right: 0.4rem;
        border-radius: 1rem;
        border: 1px solid #2d2e3a;
        background: #2d2e3a;
    }

    .duihao {
        width: 0.22rem;
        height: 0.16rem;
        margin-right: 0.08rem;
    }
    /* 精品推荐 */

    .recommon_list {
        margin-top: 0.8rem;
        margin-bottom: 0.15rem
    }

    .re_title {
        line-height: 1.0;
        padding-left: 0.08rem;
        color: #686872;
        padding-bottom: 0.05rem;
    }

    .one_line {
        margin-bottom: 0.05rem;
    }

    .one_box {
        background-color: #FFFFFF;
        width: 1%;
    }

    .re_img {
        width: 1.69rem;
        height: 0.9rem;
    }

    .prod_name {
        padding-top: 0.08rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #2d2e3a;
        font-size: 0.14rem;
    }

    .bottom_left {
        color: #96969c;
        text-decoration: line-through;
        text-decoration-color: #96969c;
    }
</style>
